#pragma once
#include "psclient.h"
#include <inttypes.h>

struct CmdHead
{
	uint8_t		tag[4];
	uint32_t	version;
	uint32_t	data_size;
	uint32_t	head_size;
};

typedef void (*FnCommand)(IPSClientContext* p, CmdHead* head);

class CGnwClient : public CPSClient
{
public:
	CGnwClient(int sock, IPSMonitor* mon, FnCommand cmd);
	virtual ~CGnwClient();

private:
	FnCommand		m_fnCommand;

protected:
	virtual void OnRecv(char* pData, int nLen);

public:
	static IPSClient*	Create(int sock, IPSMonitor* mon, FnCommand cmd);
};
